package com.gimi.cloud.jimi.dao.dao.product;

import java.util.List;
import java.util.Map;

import com.gimi.cloud.jimi.dao.dao.sys.BaseDao;
import com.gimi.cloud.jimi.dao.myMapper.core.query.QueryParam;
import com.gimi.cloud.jimi.dao.myMapper.core.query.QueryParamProvider;
import com.gimi.cloud.jimi.dto.app.ColumnProdDTO;
import org.apache.ibatis.annotations.Select;

import com.gimi.cloud.jimi.dto.product.ProductDto;
import com.gimi.cloud.jimi.entity.product.ProductEntity;
import org.apache.ibatis.annotations.SelectProvider;

public interface ProductDao extends BaseMapper<ProductEntity>,BaseDao<ProductEntity,ProductDto> {
    int deleteByPrimaryKey(String prodId);

    int insert(ProductEntity record);

    int insertSelective(ProductEntity record);
    
    int insertSelectiveDto(ProductDto record);

    ProductEntity selectByPrimaryKey(String prodId);
    
    @Select("SELECT prod_id , prod_name ,prod_adword , prod_price,prod_rent_price,prod_max_price,spec_parameter,prod_desk FROM ec_product WHERE prod_id = #{prodId}")
    ProductDto findByProdId(String prodId);
    
    List<Map<String,Object>> getStoreCats(ProductDto params);
    
    void updateByPrimaryKeyDto(ProductDto record);
    
    ProductDto selectByProdId(String prodId);

    int updateByPrimaryKeySelective(ProductEntity record);

    int updateByPrimaryKeyWithBLOBs(ProductEntity record);

    int updateByPrimaryKey(ProductEntity record);
    
    int getProdCat(String prodCatId);

    List<ProductDto> queryPageList(ProductDto pdd);

    List<ProductEntity> goToaddColumnProd(ColumnProdDTO columnProdDTO);

    @Select("SELECT prod_id ,prod_name ,prod_adword , prod_price,prod_min_price,prod_max_price FROM ec_product ")
    List<ProductDto> selectOneReturnName();

    @SelectProvider(type = QueryParamProvider.class, method = "selectListBySql")
    List<ColumnProdDTO> majorAdRelyColumnProdPage(QueryParam queryParam);
}